from ronglian_sms_sdk import SmsSDK

accId = '8aaf07086c8a1560016caed7857019b3'
accToken = '7c4f697e511b40d8bb284d9014b874c5'
appId = '8aaf07086c8a1560016caed785bd19b9'


def send_message(mobile, code, time):
    '''

    :param mobile: 手机号
    :param code: 验证码
    :param time: 分钟
    :return:
    '''
    sdk = SmsSDK(accId, accToken, appId)
    tid = '1'
    mobile = mobile
    datas = (code, time)
    resp = sdk.sendMessage(tid, mobile, datas)
    print(resp)

if __name__ == '__main__':
    # 【云通讯】您的验证码是8888，请于5分钟内正确输入
    send_message('15631120172','8888','5')